// 01.连接服务 不需要用module.exports导出 需要用直接导入
const mongoose = require('mongoose')
const config = require('./../config/config.js')
mongoose.connect(config.db, function (err) {
    if (!err) {
        console.log('mongose链接成功');
    } else {
        console.log(err);
    }
})
mongoose.connection.once("open", function () {
    console.log('监听open成功');
});